home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Bombardier_PC / BSCRIPTS.CST / 00101_Script_subCategoryOnlyInit < prev    next >
Text File  |  1999-04-25  |  3KB  |  140 lines

  1. -- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
  2. -- Developed for Bombardier, Inc.
  3. --
  4. -- All programming developed by: 
  5. -- Robert Fabricant, Valerie Valoueva, Ossi Shaked, 
  6. -- Henry Sauvageot, Chris Howell & Chris Girand
  7. --
  8. -- Use of this code by parties other than @radical.media, inc. or their
  9. --agents 
  10. -- without the express written consent of @radical.media, inc. AND Concurrent 
  11. -- New Media Group, L.L.C. is strictly prohibited.
  12. ------------------------------------------------------
  13.  
  14. property mySprite, myName, myNormal, myRoll, myHilite, myType, myGroup, lastSelected, selected, myLoc, myFrame
  15.  
  16.  
  17. on new me
  18.   global menuController
  19.   
  20.   
  21.   set mySprite = the spriteNum of me
  22.   set myNormal = the member of sprite mySprite
  23.   set myName = the name of member myNormal
  24.   set myRoller = myName&"-roll"
  25.   set myHiliter = myName&"-hil"
  26.   set myRoll = member myRoller
  27.   set myHilite = member myHiliter
  28.   set selected = 0
  29.   set myLoc = the loc of sprite mySprite
  30.   puppetsprite mySprite, true
  31.   set the loc of sprite mySprite = point(-1000, -1000)
  32.   set scriptNum = the scriptNum of sprite mySprite
  33.   set myType = the name of member scriptNum
  34.   register menuController, me, myName
  35.   return me
  36. end
  37.  
  38.  
  39.  
  40.  
  41. on heresYourGroup me, theGroup
  42.   set myGroup = theGroup
  43. end
  44.  
  45. on setLastSelected me, theLastSelObj
  46.   set lastSelected = theLastSelObj
  47. end
  48.  
  49. on getType me
  50.   return myType
  51. end
  52.  
  53.  
  54. on setFrame me, theFrame
  55.   set myFrame = theFrame
  56. end
  57.  
  58.  
  59. -- The two rollover scripts
  60. --on mouseEnter me
  61. --  if not selected then
  62. --    puppetsound 3, "subrollOldOld"
  63. --    set the member of sprite mySprite = member myRoll
  64. --  end if
  65. --end
  66. --on mouseLeave me
  67. --  if not selected then
  68. --    set the member of sprite mySprite = member myNormal
  69. --  end if
  70. --end
  71.  
  72. on reset me
  73.   set selected  = 1
  74.   set the member of sprite mySprite = member myHilite
  75. end
  76.  
  77. --
  78. --on mouseUp me
  79. --  global  comefromQTVR
  80. --  
  81. --  if selected then
  82. --    nothing
  83. --  else
  84. --    set comefromQTVR = FALSE
  85. --    set the visible of sprite 110 = TRUE
  86. --    IWasSelected lastSelected, me
  87. --    set selected = 1
  88. --    repeat with i = 1 to count(myGroup)
  89. --      set teamMate = getat(myGroup, i)
  90. --      set hisType = getType(teamMate)
  91. --      if hisType = "category" or hisType = "knob" then
  92. --        setSubCat teamMate, me
  93. --      end if
  94. --      hideYourSelf teamMate
  95. --    end repeat
  96. --    clearpups
  97. --    --    sendAllSprites(#qtvrPuppetOff, myFrame)
  98. --    go to frame myFrame
  99. --    puppetsound 3, "mouse5"
  100. --  end if
  101. --end
  102.  
  103.  
  104.  
  105. -- these 2 handlers are called when the submenu bar for this category needs to be either visible or not visible.
  106. on showYourSelf me
  107.   set the loc of sprite mySprite = myLoc
  108. end
  109.  
  110. on hideYourSelf me 
  111.   set the loc of sprite mySprite = point(-1000,-1000)
  112.   set the member of sprite mySprite = member myNormal 
  113.   set selected = 0
  114.   
  115. end
  116.  
  117.  
  118. on deselect me
  119.   repeat with i = 1 to count(myGroup)
  120.     set teamMate = getat(myGroup, i)
  121.     disable teamMate
  122.   end repeat
  123. end
  124.  
  125. on disable me
  126.   set selected = 0
  127.   set the member of sprite mySprite = member myNormal
  128.   set the loc of sprite mySprite = point(-1000,-1000)
  129. end
  130.  
  131. -- not called in this application, but necessary to call on menuController if the "behaviour line" is ever broken in a movie.
  132.  
  133. on endPuppeting me
  134.   puppetSprite mySprite, false
  135. end
  136.  
  137. on getFrame me
  138.   return myFrame
  139. end
  140.